import Router from '@koa/router';
import fs from 'fs';
import path from 'path';

import hllService from './api/hllService';

const router = new Router();

//对外提供的接口
router.use('/api/hllService', hllService);
router.get('/page/addToken', (ctx) => {
  const htmlUrl = path.resolve('./', 'src/pages/addToken.html');
  const htmlCon = fs.readFileSync(htmlUrl);
  ctx.set('content-type', 'text/html');
  ctx.body = htmlCon;
});


export default router;
